package IC.lir.Instrunction;

import java.util.LinkedList;

public abstract class FunctionCallInstruction<ParamType> extends Instruction {
	
	protected Register _retRegister;
	protected IC.AST.FunctionCall _ASTNode;
	
	protected LinkedList<ParamType> _params = new LinkedList<ParamType>();
	
	protected FunctionCallInstruction (Register retRegister, IC.AST.FunctionCall node)
	{
		_retRegister = retRegister;
		_ASTNode = node;
	}
	
	protected String ParamsListToString(java.util.LinkedList<ParamType> params)
	{
		String ret = "";
		if (params.size() == 0)
			return ret;
		
		for (ParamType param : params)
			ret += ", " + param.toString();

		return ret.substring(2);
	}
}
